import { http } from "@/utils/http";

export type commonResult<T> = {
	code: number;
	msg: string;
	result: T;
};

export type infoType = {

	id?: number,
	projectId?: number,
	projectName?: string,
	unityName?: string,
	productName?: string,
	place?: string,
	deviceId?: number,
	deviceName?: string,
	deviceSN?: string,
	alarmTitle?: string,
	confirm?: number,
	alarmType?: number,
	dealStatus?: number,
	createdAt?: string,
}
export type infoTypeList = {
	data: infoType[];
	total: number;
};

const List = '/system/alarm/v2/user/alarm-record';
const Url = '/system/alarm/v2/alarm';
export const getList = (params?: object) => {
	return http.request<commonResult<infoTypeList>>("get", List, {
		params
	});
};
export const getInfo = (params?: object) => {
	return http.request<commonResult<infoType>>("get", Url, {
		params
	});
};

